package ooday03.Animal02;

import java.security.spec.RSAOtherPrimeInfo;

public class Duck extends Animal implements Fly{
    Duck(String name ,String kind){
        super(name ,kind);
    }

    @Override
    void run() {
        System.out.println("我叫"+name+"我是"+kind+"科动物"+"我可以跑,我还能游泳,因为我是两栖动物");
    }

    @Override
    public void fly() {
        System.out.println("我是"+kind+"科动物,我可以飞");
    }
}
